<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<!--author: AGolubinskyy -->
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title>Reporter</title>
    </h:head>
    <h:body>
        <ui:component>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="Select users" styleClass="reportsOptionHeader"/>
                    <h:outputText value="Select managers"  styleClass="reportsOptionHeader"/>
                    <p:pickList value="#{reporterBean.users}" 
                                var="u"
                                itemLabel="#{u.firstName} #{u.lastName}" 
                                itemValue="#{u}" 
                                converter="userConverter"/>
                    <p:pickList value="#{reporterBean.managers}" 
                                var="m"
                                itemLabel="#{m.firstName} #{m.lastName}"
                                itemValue="#{m}" 
                                converter="userConverter"/>
                    <h:outputText value="Select products" styleClass="reportsOptionHeader"/>
                    <h:outputText value="Select request statuses" styleClass="reportsOptionHeader"/>
                    <p:pickList value="#{reporterBean.products}" 
                                var="p"
                                itemLabel="#{p.description}"
                                itemValue="#{p}"
                                converter="productConverter"/>
                    <p:pickList value="#{reporterBean.statuses}" 
                                var="s"
                                itemLabel="#{s.description}"
                                itemValue="#{s}"
                                converter="statusConverter"/>

                    <h:outputText value="Select other options" styleClass="reportsOptionHeader"/>
                    <h:outputText value=""/>
                    <h:panelGrid columns="4">
                        <h:outputText value="From date"/><p:calendar value="#{reporterBean.dateFrom}" mode="popup"/>
                        <h:outputText value="To date"/><p:calendar value="#{reporterBean.dateTo}" mode="popup"/>
                        <!--<h:outputText value="With description"/><h:inputText value="#{reporterBean.description}"/>
                        <h:outputText value="With messge"/><h:inputText value="#{reporterBean.message}"/>-->
                        <h:selectOneRadio value="#{reporterBean.common}" layout="pageDirection">
                            <f:selectItem itemLabel="Common" itemValue="1"/>
                            <f:selectItem itemLabel="Non-common" itemValue="2"/>
                            <f:selectItem itemLabel="Both" itemValue="0"/>
                        </h:selectOneRadio>
                    </h:panelGrid>
                </h:panelGrid>
                <h:commandLink value="Get PDF" target="_blank" action="#{reporterBean.exportPdfFile()}"/>
            </h:form>
        </ui:component>
    </h:body>
</html>
